#include <stdio.h>

typedef struct Account{
    int id;
    char* name;
    char* password;
    double balance;
}Account;

int main(){
    Account accounts[3] = 
    {
        {1,"aaa","111",100.01},
        {2,"bbb","222",100.02},
        {3,"ccc","333",100.03}
    };

    double sum = 0,avg;
    int num = sizeof(accounts) / sizeof(Account);
    int i;
    for (i = 0; i < num; i++)
    {
        sum = sum +accounts[i].balance;
    }
    avg = sum / num;

    for ( i = 0; i < num; i++)
    {
        if (accounts[i].balance > avg)
        {
            printf("id = %d\n",accounts[i].id);
            printf("name = %s\n",accounts[i].name);
            printf("password = %s\n",accounts[i].password);
            printf("balance = %f\n",accounts[i].balance);
        }
        
    }
    return 0;
}